package com.tinysand.advert.service;

import com.tinysand.advert.exception.AdvertException;
import com.tinysand.advert.support.*;

/**
 * 推广单元服务接口定义
 *
 * Created By TINY
 * Create Time 2020/2/21
 **/
public interface AdUnitService {

    /**
     * 创建推广单元
     *
     * @param request 推广单元创建请求 {@link AdUnitRequest}
     * @return 推广单元响应对象 {@link AdUnitResponse}
     * @throws AdvertException 业务异常
     */
    AdUnitResponse createAdUnit(
            AdUnitRequest request) throws AdvertException;

    /**
     * 创建推广单元关键字限制
     *
     * @param request 关键字限制请求对象 {@link AdKeywordRequest}
     * @return 关键字限制请求响应 {@link AdKeywordResponse}
     * @throws AdvertException 业务异常
     */
    AdKeywordResponse createUnitKeyword(AdKeywordRequest request)
            throws AdvertException;

    /**
     * 创建推广单元兴趣限制
     *
     * @param request 兴趣限制请求对象 {@link AdInterestRequest}
     * @return 兴趣限制请求响应 {@link AdInterestResponse}
     * @throws AdvertException 业务异常
     */
    AdInterestResponse createUnitInterest(
            AdInterestRequest request) throws AdvertException;

    /**
     * 创建推广单元地域限制
     *
     * @param request 地域限制请求对象 {@link AdDistrictRequest}
     * @return 地域限制请求响应 {@link AdDistrictResponse}
     * @throws AdvertException 业务异常
     */
    AdDistrictResponse createUnitDistrict(
            AdDistrictRequest request) throws AdvertException;

    /**
     * 创建广告与推广单元
     *
     * @param relRequest 广告与推广单元的关系创建请求对象 {@link AdUnitRelRequest}
     * @return 广告与推广单元的关系创建请求响应 {@link AdUnitRelResponse}
     * @throws AdvertException 业务异常
     */
    AdUnitRelResponse createAdUnitRel(AdUnitRelRequest relRequest)
            throws AdvertException;
}
